<template>
  <svg v-if="type === 'symbol'" class="iconsymbol icon" aria-hidden="true" :style="{color: color, width: size + 'rpx', height: size + 'rpx'}">
    <use :xlink:href="`#${icon}`"></use>
  </svg>
  <text v-else :style="{ color: color, 'font-size': size + 'rpx' }" class="icon" :class="icon"></text>
</template>

<script>
  /**
   * Icons 图标
   * @description 用于展示 icons 图标
   * @property {Number} size 图标大小
   * @property {String} color 图标颜色
   * @event {Function} click 点击 Icon 触发事件
   */
  export default {
    name: 'dxIcons',
    props: {
      type: {
          type: String,
          default: ''
      },
      color: {
        type: String,
        default: '#333'
      },
      size: {
        type: [Number, String],
        default: 30
      },
      icon: {
        type: String,
        default: ''
      }
    },
    data() {
      return {};
    },
    methods: {
    }
  };
</script>

<style lang="less" scoped>
  @font-face {
    font-family: "iconfont"; /* Project id 3693362 */
    src: url('./fonts/iconfont.woff2') format('woff2'),
         url('./fonts/iconfont.woff') format('woff'),
         url('./fonts/iconfont.ttf') format('truetype');
  }
  
  .icon {
    font-family: "iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .icon-kefu:before {
    content: "\e608";
  }
  
  .icon-queshengye_zanwushuju:before {
    content: "\e760";
  }
  
  .icon-guanyu:before {
    content: "\e684";
  }
  
  .icon-tousu:before {
    content: "\e625";
  }
  
  .icon-yue:before {
    content: "\e69d";
  }
  
  .icon-bianji:before {
    content: "\e678";
  }
  
  .icon-dingdan:before {
    content: "\e61e";
  }
  
  .icon-qingli:before {
    content: "\e62a";
  }
  
  .icon-hezuo:before {
    content: "\e85d";
  }
  
  .icon-bangzhu:before {
    content: "\e60e";
  }
  
  .icon-saoma:before {
    content: "\e657";
  }
  
  .icon-jinhangzhong:before {
    content: "\e606";
  }
  
  .icon-yiwancheng:before {
    content: "\e607";
  }
  
  .icon-guanbi:before {
    content: "\e6ae";
  }
  
  .icon-chaodagui:before {
    content: "\e604";
  }
  
  .icon-zhonggui:before {
    content: "\e605";
  }
  
  .icon-shoujicunqu:before {
    content: "\e603";
  }
  
  .icon-xiaogui:before {
    content: "\e600";
  }
  
  .icon-pingmu:before {
    content: "\e601";
  }
  
  .icon-dagui:before {
    content: "\e602";
  }
  
  .icon-arrow-right:before {
    content: "\e646";
  }
  
  .icon-danquxunhuan:before {
    content: "\f1f9";
  }
  
  .icon-liebiaoxunhuan:before {
    content: "\f1fa";
  }
  
  .icon-didian:before {
    content: "\e66c";
  }
  
</style>
